
package main

import (
	"fmt"
)


/**
 * 结构体 
 *type struct_variable_type struct {
 *	member definition;
 *	member definition;
 *	...
 * 	member definition;
 *	}
 *
 */

 /**
  * 定义结构体
  */
 type Dept struct {
	deptNo string 
	deptName string 
	deptLevel int 
	remark string
  }


func main() {
	
	fmt.Println(Dept{"0001","成长部1",1,"关注成长"})
	fmt.Println(Dept{deptNo:"0002",deptName:"成长部2",deptLevel:2,remark:"关注成长"})

	//忽略字段为 0 或 空
	fmt.Println(Dept{deptNo:"0003",deptName:"成长部3"})

	var dept1 Dept 
	dept1.deptNo = "0008"
	dept1.deptName="成长8部"

	println()
	fmt.Println(dept1)

	// 为空
	fmt.Println(dept1.remark)

	//部门名称
	fmt.Println(dept1.deptName)

}